package com.zkq.graduate.service.impl;

import com.zkq.graduate.mapper.TeacherMapper;
import com.zkq.graduate.service.TeacherService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @Author zhangkaiqiang
 * @Date 2020/1/16  14:37
 * @Description TODO
 */
@Service(value = "teacherService")
public class TeacherServiceImpl implements TeacherService {

	@Resource
	private TeacherMapper teacherMapper;

	@Override
	public boolean batchInsertTeacher(List<Map<String, String>> teachers) {
		if(CollectionUtils.isEmpty(teachers)){
			return false;
		}
		return teacherMapper.batchInsertTeacher(teachers)==teachers.size();
	}
}
